
import { createApp } from 'vue';
import App from './App.vue';


import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';

// 导入响应式 Element Plus 配置

import '@/assets/styles/global.scss';

const app = createApp(App);
// 全局异常处理
app.config.errorHandler = (err, vm, info) => {
    // 处理错误
    console.error('globalErrorHandler', err, vm, info);
};

// 全局注册图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}


import locale from 'element-plus/es/locale/lang/zh-cn';
app.use(ElementPlus, {
    locale,
});


import router from './router';
app.use(router);

import pinia from './stores';
app.use(pinia);
app.mount('#app')
